package com.example.shop.order.dto;

import com.example.shop.common.api.ResponseResult;
import com.example.shop.merchant.dto.MerchantBriefInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsInfo {
    private long goodsId;
    private MerchantBriefInfo merchantBriefInfo;
    private String goodsDescriptionPicture;
    private String goodsName;

    public void setGoodsDescriptionPicture(String goodsDescriptionPicture) {
        this.goodsDescriptionPicture = ResponseResult.toRequestPath(goodsDescriptionPicture);
    }

    @Override
    public String toString() {
        return "OrderGoodsInfo{" +
                "goodsId=" + goodsId +
                ", merchantBriefInfo=" + merchantBriefInfo +
                ", goodsDescriptionPicture='" + goodsDescriptionPicture + '\'' +
                ", goodsName='" + goodsName + '\'' +
                '}';
    }
}
